﻿using System.Collections.Generic;
using System.Linq;
using Gumini.JulaDB.Data;
using Gumini.JulaDB.Engine;
using Gumini.JulaDB.Interfaces;

namespace Gumini.JulaDB.Planner
{
    /// <summary>
    /// TODO: Update summary.
    /// </summary>
    internal abstract class JoinNode : BinaryPlanNode
    {
        public JoinNode(PlanNode nodeA, PlanNode nodeB)
            : base(nodeA, nodeB) { }

        public override IHeading<TemporaryColumn> GetColumns()
        {
            return new TableHeading<TemporaryColumn>(LeftNode.Heading.Union(RightNode.Heading));
        }
    }
}
